package com.xuecheng.media.api;

import com.xuecheng.commons.model.vo.MediaVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import javax.print.attribute.standard.Media;

/**
 * 编写feign的客户端，Feign就可以帮助我们发送http请求，无需自己使用RestTemplate来发送了
 * @Author 12441
 * @Date 2022/9/19 18:29
 * @Version 1.0
 */
@FeignClient("xc-media-service")
public interface MediaClient {
    /**
     * 根据id查询媒资
     * ResponseResult<Media>指定泛型,不然JSON数据默认以Object类型接收
     */

    @GetMapping("/media/{mediaId}")
    ResponseResult<MediaVo> associationMediaWithTeachPlan(@PathVariable("mediaId")Long mediaId);

}
